﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/check/";  //应用的地址名
String listActionName = basePath+"CaseSourceCheck.action?op=searchjs";

String checkRegPageActionName = basePath+"CaseSourceCheck_checkRegPage.action";
String checkEntPageActionName = basePath+"CaseSourceCheck_checkEntPage.action";
String lookFrameActionName = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/source/CaseSourceReceive_lookItemFrame.action?";
String checkNoticePageActionName = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/source/CaseSourceReceive_checkNoticePage.action";
String excelActionName=basePath+"CaseSourceCheck_saExcel.action";
%>
<script language="javascript" src="<%=path %>/js/My97/WdatePicker.js"></script>
<script language="javascript" src="<%=path %>/js/fileupload.js"></script>
<script language="javascript" src="<%=path %>/jslib/orgSelect.js"></script>
<script type="text/javascript">
    		$(function(){
    			$('#inspectDept').orgSelect({
    				inspectDeptId:'inspectDept',
    		        collectDeptId:'collectDept'
    			});	
			//表格初始化
			$('#searchTable').grid({
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
				singleSelect:true,
	            queryParams : {
					"search.taxpayerNum" : "",
					"search.involvedEnt" : "",
					"search.caseNum" : "",
					"search.recBeginDate" : "",
					"search.recEndDate" : "",
					"search.caseFrom" : "",
					"search.illegalType" : "",
					"search.inspectDept" : "",
					"search.collectDept" : ""
			    }, //用于查询的参数以及初始值
			//表头列，不建议改动
			frozenColumns : [ [ {
				field : 'ck',
				checkbox : true
			}, {
				field : 'taxpayerNumber',
				title : '纳税人识别号',
				width : 120,
				sortable : true
			}, {
				field : 'involvedEnterprice',
				title : '涉案企业',
				width : 200,
				sortable : true
			} ] ],
			//数据列，根据显示的内容进行修改
			columns : [ [

			 {
				field : 'state',
				title : '状态',		
				width : 100,
				sortable : true,
				formatter : function(value,row) {
					var statu=row.vcStatus_;
					var statuInfo='';
					if(0==statu){
						statuInfo="待签收";
					}else if(1==statu){
						statuInfo="已签收";
					}
					
					var endType=row.vcEndType;
					var endInfo='';
					if(1==endType){
						endInfo="(中止检查)";
					}else if(2==endType){
						endInfo="(终止检查)";
					}else if(3==endType){
						endInfo="(中止执行)";
					}else if(4==endType){
						endInfo="(终止执行)";
					}
					
					if (value == '1') {
						return "选案 "+statuInfo+endInfo;
					} else if (value == '2') {
						return "检查 "+statuInfo+endInfo;
					} else if (value == '3') {
						return "审理 "+statuInfo+endInfo;
					} else if (value == '4') {
						return "执行 "+statuInfo+endInfo;
					} else if (value == '9') {
						return "结案";
					} else if (value == '-2') {
						return "暂存待查";
					}else if(value == ''){
						return "未下达";
					}
				}
			},{
				field : 'caseFromName',
				title : '案件来源',
				width : 120,
				sortable : true
			}, {
				field : 'checkHead',
				title : '主查人员',
				width : 120,
				sortable : true
			}, {
				field : 'checkPerson',
				title : '副查人员',
				width : 120,
				sortable : true
			}, {
				field : 'personCount',
				title : '出动检查人员人数',
				width : 120,
				sortable : true
			}, {
				field : 'takeSteps',
				title : '已采取检查措施',
				width : 120,
				sortable : true
			}, {
				field : 'illegalTypeName',
				title : '涉嫌违法类型',
				width : 120,
				sortable : true
			}, {
				field : 'involvedMoney',
				title : ' 预计涉案金额（万元）',
				width : 120,
				sortable : true
			}, {
				field : 'taxMoney',
				title : '预计税款金额（万元）',
				width : 120,
				sortable : true
			}, {
				field : 'billCount',
				title : '预计涉嫌违法发票份数',
				width : 120,
				sortable : true
			}

			] ],
			//功能按钮组
			toolbar : [ <ce:jsonBtn/> ]
		});
		//查询操作
		$('#search').click(function() {
			defaultSearchAction();
		});
		$('#resetSearch').click(function(){
			
		});
	});

   		function openAddPage() {
   			defaultOpenDealPageHavebtn('<%=checkRegPageActionName%>',550,550,null,'检查情况登记');
   			}
       function addBaseItems(){
    	   defaultOpenDealPageHavebtn('<%=checkEntPageActionName%>',650,550,null,'检查对象基本情况');
       }
       
       function viewItem(id){
			var rows = $('#searchTable').datagrid('getSelections');	
			var num=rows[0].taxpayerNumber;
			parent.addTabs_(num+'案源查看','<%=lookFrameActionName%>&chkSelf='+id);
		}
       
       function addTb() {
 			defaultOpenDealPageHavebtn('<%=checkNoticePageActionName%>?fileType=检查任务通知书',550,350,null,'检查任务通知书');
 		}
       
       function addZdqk(){
    	   defaultOpenDealPageHavebtn('<%=checkNoticePageActionName%>?fileType=重大情况报告',550,350,null,'重大情况报告');
       }
       
       function addCztb(){
    	   defaultOpenDealPageHavebtn('<%=checkNoticePageActionName%>?fileType=查中通报',550,350,null,'查中通报');
       }
       
       function addJcbg(){
    	   defaultOpenDealPageHavebtn('<%=checkNoticePageActionName%>?fileType=稽查报告',550,350,null,'稽查报告');
       }
       
       function submitReport(){
    	   
       }
   	function saveAsExcel(){
   	   if($('#saveExcelFrm').length==0){
   			$('<iframe id="saveExcelFrm" name="saveExcelFrm" width=0 height=0></iframe>').appendTo(document.body);
   		}
   		var f = $('form:first');
   		var fa = f.attr('action');
   		f.attr('target','saveExcelFrm');
   		f.attr('action','<%=excelActionName%>');
   		f[0].submit();
   		f.attr('target','');
   		f.attr('action',fa);
  }
    </script>
<html>
  <head>
    <title>检查案源台账</title>
  </head> 
<body class="easyui-layout">
<form id="excelSearch">
<div class="div_height_auto" data-options="region:'north',border:false" style="overflow: hidden;" align="left">
       <table>
<tr>
	<td align="right">纳税人识别号：</td><td><input type="text" name="search.taxpayerNum" id="taxpayerNum" style="width:100px;"/></td>
	<td align="right">涉案企业名称：</td><td><input type="text" name="search.involvedEnt" id="involvedEnt"  style="width:100px;"/></td>
	<td align="right">案源编号：</td><td><input type="text" name="search.caseNum" id="caseNum"  style="width:100px;"/></td>
	<td align="right">接收日期：</td>
	<td><input type="text" name="search.recBeginDate" id="recBeginDate" style="width:100px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>&nbsp;至&nbsp;
	    <input type="text" name="search.recEndDate" id="recEndDate"  style="width:100px;"  class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>
	</td>
</tr>
<tr>
	<td align="right">案件来源：</td><td><ce:dictSelect name="search.caseFrom" id="caseFrom"  dictName="备选案源台账-案件来源" allOption="true" style="width:100px;"/></td>
	<td align="right">涉嫌违法类型：</td><td><ce:dictSelect name="search.illegalType" id="illegalType"   dictName="备选案源台账-涉嫌违法类型" allOption="true" style="width:100px;"/></td>
	<td align="right">所属稽查局：</td><td><select name="search.inspectDept" id="inspectDept"  style="width:100px;"></select></td>
	<td align="right">所属征管局：</td>
	<td colspan="2">
	<select name="search.collectDept" id="collectDept"  style="width:100px;"></select>
	</td>
	<td rowspan="2">
	   <a id="search" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
	   <a id="resetSearch" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-redo">重置</a>
	</td>
</tr>
</table>
</div>
<div data-options="region:'center',border:false" style="overflow: hidden;">
  <table id="searchTable"></table>
</div>
</form>
</body>
</html>
   
   

